package com.longlong.controller;

import lombok.extern.slf4j.Slf4j;

import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * 原始 servlet
 * 一个请求 对应 一个类
 *
 * @author longlong
 * @date 2025/1/25
 */
@Slf4j
public class UserController extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        log.info("UserController service method start...");
        PrintWriter writer = resp.getWriter();
        writer.write("hello world");
        log.info("UserController service method end...");
    }
}
